#ifndef __SPACEDEFENDER_Loghandler_H__
#define __SPACEDEFENDER_Loghandler_H__

#include <string>
#include <list>
#include "subject.h"

namespace spacedefender
{

class Loghandler : public Subject
{
	public:
		static Loghandler* GetInstance();
		void Log(std::string msg);
		virtual std::list<std::string>* GetLog() const;
		virtual std::string GetLatestLogText() const;
	private:
		Loghandler();
		virtual ~Loghandler();
		
		static Loghandler _loghandler;
		std::list<std::string>* _log;
		std::string _lastMsg;
};

}
#endif //__SPACEDEFENDER_Loghandler_H__
